package com.uls.questionnaire.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.uls.questionnaire.mapper.SurveyrulesMapper;
import com.uls.questionnaire.domain.Surveyrules;
import com.uls.questionnaire.service.ISurveyrulesService;

/**
 * 问卷规则设置Service业务层处理
 * 
 * @author zxh
 * @date 2024-11-09
 */
@Service
public class SurveyrulesServiceImpl implements ISurveyrulesService 
{
    @Autowired
    private SurveyrulesMapper surveyrulesMapper;

    /**
     * 查询问卷规则设置
     * 
     * @param ruleId 问卷规则设置主键
     * @return 问卷规则设置
     */
    @Override
    public Surveyrules selectSurveyrulesByRuleId(Long ruleId)
    {
        return surveyrulesMapper.selectSurveyrulesByRuleId(ruleId);
    }

    /**
     * 查询问卷规则设置列表
     * 
     * @param surveyrules 问卷规则设置
     * @return 问卷规则设置
     */
    @Override
    public List<Surveyrules> selectSurveyrulesList(Surveyrules surveyrules)
    {
        return surveyrulesMapper.selectSurveyrulesList(surveyrules);
    }

    /**
     * 新增问卷规则设置
     * 
     * @param surveyrules 问卷规则设置
     * @return 结果
     */
    @Override
    public int insertSurveyrules(Surveyrules surveyrules)
    {
        return surveyrulesMapper.insertSurveyrules(surveyrules);
    }

    /**
     * 修改问卷规则设置
     * 
     * @param surveyrules 问卷规则设置
     * @return 结果
     */
    @Override
    public int updateSurveyrules(Surveyrules surveyrules)
    {
        return surveyrulesMapper.updateSurveyrules(surveyrules);
    }

    /**
     * 批量删除问卷规则设置
     * 
     * @param ruleIds 需要删除的问卷规则设置主键
     * @return 结果
     */
    @Override
    public int deleteSurveyrulesByRuleIds(Long[] ruleIds)
    {
        return surveyrulesMapper.deleteSurveyrulesByRuleIds(ruleIds);
    }

    /**
     * 删除问卷规则设置信息
     * 
     * @param ruleId 问卷规则设置主键
     * @return 结果
     */
    @Override
    public int deleteSurveyrulesByRuleId(Long ruleId)
    {
        return surveyrulesMapper.deleteSurveyrulesByRuleId(ruleId);
    }
}
